#pragma once
#include<vector>
#include"CoordTrans/include/CoordTrans.h"
#include"grid/include/grid.h"
class Grid;
//grid node
class GridNode
{
public:
	GridNode() {};
	GridNode(Grid* grid, const size_t nodeIndex, const Point& coord);
	GridNode(const GridNode& gridnode);
public:
	void SetNeiborNode(vector<GridNode*>& neiborNodeVec);
	void AddNeiborNode(GridNode* node);
	void DeleteNeiborNode(GridNode* node);
	void SetNodeType(BoundType nodeType) { nodeType_ = nodeType; }
public:
	void ReoderNeibor();
	double GetNeiborPoolRadius();
public:
	Point* GetCoord();
	size_t GetIndex()const;
	size_t GetGridIndex()const;
	Grid* GetGridPtr();
	vector<CoordTrans>* GetCoordTranCoef();
	BoundType* GetNodeType();
	vector<GridNode*>* GetNeiborNodePtr();
private:
	Point coord_;
	// node index
	size_t index_;
	// parant grid, can't change parent grid for here
	Grid* parentGrid_;
	vector<CoordTrans> coordTransCoef_;
	BoundType nodeType_;
	vector<GridNode*>neiborNode_;
};